<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>查看已选课程</title>
    <style>
        body {
            background-color: azure;
            position: relative;
        }

        input[type=submit] {
            width: 100px;
            height: 30px;
            background-color: rgb(244, 244, 244);
            border: none;
            margin-left: 200px;
        }
    </style>
</head>
<body>
<h1>欢迎您！<span th:text="${name}"></span></h1>
<h2>个人选课系统</h2>

<form method="post" th:align="center" th:object="${userInfo}">
    <h3>个人信息</h3>
    姓名：<span th:text="${userInfo.name}"> <br/>
        学号：<span th:text="${userInfo.id}"> <br/>
        专业：<span th:text="${userInfo.profession}"> <br/>
        年级：<span th:text="${userInfo.grade}"> <br/>
        学院：<span th:text="${userInfo.college}"> <br/>

    <br>
</form>

<form method="POST" th:action="@{/logout}" id="logoutForm">
    <!--遍历课程列表-->
    <h3>已选课程</h3>
        <div th:each="classtochoose:${classes}">
            <input name="classtochooses" type="checkbox" th:value="${classtochoose.name}" checked/>
            <span th:text="${classtochoose.name}"></span><br>
        </div>

    </div>
    <br>
    <input type="submit" value="Logout"/>

</form>
</body>
</html>